package com.itheima.date8;

import java.time.LocalDateTime;

public class Demo05 {

    public static void main(String[] args) {
        LocalDateTime now = LocalDateTime.now();
        LocalDateTime dateTime = now.withYear(2011);
        System.out.println(now);
        System.out.println(dateTime);
        LocalDateTime dateTime1 = now.withMonth(11);
        System.out.println(dateTime1);
        LocalDateTime dateTime2 = now.withDayOfMonth(11);
        System.out.println(dateTime2);
        LocalDateTime dateTime3 = now.withYear(2011).withMonth(11).withDayOfMonth(11);
        System.out.println(dateTime3);
        System.out.println(now.withYear(50000000));
        //System.out.println(now.withMonth(13));
       // System.out.println(now.withDayOfMonth(32));

    }
}
